package services.impl;

import beans.Contract;
import dao.ContractDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import services.ContractServices;

import java.util.List;

@Service
public class ContractServicesImpl implements ContractServices {
    @Autowired
    private ContractDao contractDao;

    @Override
    public List<Contract> selectList() {
        List<Contract> list = contractDao.selectList();
        return list;
    }

    @Override
    public List<Contract> selectSelective(String selectText, String inputText) {
        List<Contract> list = contractDao.selectSelective(selectText,inputText);
        return list;
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        int i = contractDao.deleteByPrimaryKey(id);
        return i;
    }

    @Override
    public int insert(Contract record) {
        int i = contractDao.insert(record);
        return i;
    }

    @Override
    public int insertSelective(Contract record) {
        int i = contractDao.insertSelective(record);
        return i;
    }

    @Override
    public Contract selectByPrimaryKey(Integer id) {
        Contract contract = contractDao.selectByPrimaryKey(id);
        return contract;
    }

    @Override
    public int updateByPrimaryKeySelective(Contract record) {
        int i = contractDao.updateByPrimaryKeySelective(record);
        return i;
    }

    @Override
    public int updateByPrimaryKey(Contract record) {
        int i = contractDao.updateByPrimaryKey(record);
        return i;
    }

    @Override
    public int count() {
        return contractDao.count();
    }
}
